<?php
    include 'DAO/UserDAO.class.php';

    $nameforsearch = $_POST['search'];
    $userDao = new UserDAO();
    $userId = $userDao->retrieveId($nameforsearch);
    if(!$userId){
        echo "Ο χρήστης δε βρέθηκε.";
        echo "<a href='index.php'> Επιστροφή </a>";
    }
    else
        header("Location: user.php?userId=$userId");

?>
